Generate index.yaml on merge instead of gating it in PRs#6
Merged
Conversation
index.yaml is what datumctl reads and is fully derived from plugins/*.yaml. Treating it as a reviewed source file — regenerated and committed in every PR, with CI failing on drift — put that work on every contributor and on the release bot, which only edits plugins/<name>.yaml (its catalog PRs failed the drift gate). It was also the source of the earlier merge conflict, since the same generated file was edited on both a PR branch and main. Treat it as a build artifact instead: - Drop the index-sync gate from PR validation. PRs (human or bot) touch only plugins/*.yaml. Validation still schema-checks each manifest and verifies every download URL and checksum, so correctness is enforced before merge. - Regenerate index.yaml on merge (push to main touching plugins/**) and commit it straight back to main. main is unprotected, so the built-in token pushes directly — no app token, no trailing PR. The commit touches only index.yaml and token pushes don't retrigger workflows, so it never loops; a concurrency group plus rebase-retry handles closely-spaced merges. Contributors now edit one file and never touch the index by hand.
JoseSzycho
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
index.yamlis whatdatumctlreads, and it's fully derived fromplugins/*.yaml. The current CI treats it as a reviewed source file: every PR must regenerate and commit it, and validation fails if it drifts. That puts generation work on:update-plugin-indexautomation only editsplugins/<name>.yaml, so its catalog PRs fail the drift gate (#5 is exactly this: v0.3.0 opened, then failedCheck index.yaml is in sync).It was also the root of the earlier merge conflict on #1 — the same generated file edited on both a PR branch and
main.What
Treat
index.yamlas a build artifact, reconciled automatically:plugins/*.yaml. Validation still schema-checks each manifest and verifies every download URL and checksum, so nothing broken can merge; only the generated index is no longer reviewed.generate-index.yaml): a push tomainthat touchesplugins/**regeneratesindex.yamland commits it straight back tomain.mainis unprotected, so the built-inGITHUB_TOKENpushes directly — no app token, no trailing chore PR. The commit changes onlyindex.yaml(notplugins/**) and token pushes don't retrigger workflows, so it never loops; aconcurrencygroup + rebase-retry covers closely-spaced merges.Net: contributors and the bot edit exactly one file and never touch the index by hand.
Notes
datum-cloud/actionsor the ipam release workflow — the genericupdate-plugin-indexaction keeps doing only what it should (edit the manifest).scripts/generate_index.pygenerator is unchanged and still runnable locally to preview.Verification
actionlintclean on both workflows; the generator no-ops against the current in-syncmain.